#include "../include/head.h"
int shareResInit(shareRes_t *pshareRes, int longWorkNum, int shortWorkNum){
    pshareRes->flag = 0;
    pshareRes->long_tidarr.workerNum = longWorkNum;
    pshareRes->long_tidarr.arr = (pthread_t*)calloc(longWorkNum, sizeof(pthread_t));
    pshareRes->short_tidarr.workerNum = shortWorkNum;
    pshareRes->short_tidarr.arr = (pthread_t*)calloc(shortWorkNum, sizeof(pthread_t));
}
